<?php

namespace App\Jobs;

use App\Wen\Utils\PostUtils;
use App\Wen\Utils\RealtimeUtils;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class RealtimeTopAndFlowJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
    public $tries = 1;
    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        //
        RealtimeUtils::get_top_posts();
        RealtimeUtils::get_topic_top();
        RealtimeUtils::get_user_top();
        RealtimeUtils::get_circle_top();
        PostUtils::get_circles_flow('flow:circles:1');
        PostUtils::get_circles_flow('flow:circles:2');
        PostUtils::get_circles_flow('flow:circles:3');
        PostUtils::get_circles_flow('flow:circles:4');
        PostUtils::get_topics_flow('flow:topics:1');
        PostUtils::get_topics_flow('flow:topics:2');
        PostUtils::get_topics_flow('flow:topics:3');
        PostUtils::get_topics_flow('flow:topics:4');
        PostUtils::get_topics_flow('flow:topics:5');
        PostUtils::get_topics_flow('flow:topics:6');
        PostUtils::get_topics_flow('flow:topics:7');
        PostUtils::get_topics_flow('flow:topics:8');
        PostUtils::get_users_flow('flow:users:1');
        PostUtils::get_users_flow('flow:users:2');
        PostUtils::get_users_flow('flow:users:3');
        PostUtils::get_users_flow('flow:users:4');
        PostUtils::get_users_flow('flow:users:5');
        PostUtils::get_users_flow('flow:users:6');
        PostUtils::get_users_flow('flow:users:7');
    }
}
